gridpack::parser::CmdLineParser Class Reference

#include <cmd_line.hpp>

Collaboration diagram for gridpack::parser::CmdLineParser:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 CmdLineParser (int argv, char **argc)
 ~CmdLineParser (void)
int numCmdTokens ()
std::string getToken (int idx)
std::string getTokenAfter (const char *key)

Constructor & Destructor Documentation

gridpack::parser::CmdLineParser::CmdLineParser ( int  argv,
char **  argc 
)

Default constructor

Parameters:
argv standard argv from main
argc standard argc from main
gridpack::parser::CmdLineParser::~CmdLineParser ( void   ) 

Default destructor


Member Function Documentation

std::string gridpack::parser::CmdLineParser::getToken ( int  idx  ) 

Return the requested token (by index)

Parameters:
idx index of requested token
Returns:
requested token
std::string gridpack::parser::CmdLineParser::getTokenAfter ( const char *  key  ) 

Get the token after the token represented by the string. The token given in the argument will match any token that contains the same first characters as the input string

Parameters:
key string that is used to match token in internal list
Returns:
next token in command list after key
int gridpack::parser::CmdLineParser::numCmdTokens (  ) 

Return the total number of tokens found in command line arguments. This is one less than the original argv

Returns:
number of command line tokens

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 3 Feb 2020 for GridPACK by  doxygen 1.6.1